<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj = {
            name:"老王",
            age:18
        }
        // let arr = Object.keys(obj);
        // let arr2 = Object.values(obj);
        // console.log(arr);
        // console.log(arr2);

        // obj.name ='王老吉';

        // obj.age = null
        // delete obj.age;

        // console.log(obj);

        // for(let item in obj){
        //     console.log(item);
        // }


        let obj2 = Object.create(obj,{
            name:{
                value:"小李",
                writable:true,
                configurable:true,
                enumerable:true
            },
            age:{
                value:20
            }
        });

        // obj2.name = '李明';

        // delete obj2.name;


        for(let item in obj2){
            console.log(item);
        }

        // console.log(obj2);




    </script>
</body>
</html>